import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JDialog;


public class VoresActionListener implements ActionListener {
	private boolean oneTeam, twoTeams, twoMin, fiveMin, tenMin, easy, normal, hard ;
	private GUI parent;
	private JDialog savedExercisesWindow;
	public VoresActionListener(boolean oneTeam, boolean twoTeams, boolean twoMin, boolean fiveMin, boolean tenMin, boolean easy, boolean normal, boolean hard, GUI parent, JDialog savedExercisesWindow)
	{
		this.parent = parent;
		this.oneTeam = oneTeam;
		this.twoTeams = twoTeams;
		this.twoMin = twoMin;
		this.fiveMin = fiveMin;
		this.tenMin = tenMin;
		this.easy = easy;
		this.normal = normal;
		this.hard = hard;
		this.savedExercisesWindow = savedExercisesWindow;
	}

	public void actionPerformed(ActionEvent e) 
	{
		parent.oneTeamButton.setSelected(oneTeam);
		parent.twoTeamsButton.setSelected(twoTeams);
		parent.twoMinButton.setSelected(twoMin);
		parent.fiveMinButton.setSelected(fiveMin);
		parent.tenMinButton.setSelected(tenMin);
		parent.easyButton.setSelected(easy);
		parent.normalButton.setSelected(normal);
		parent.hardButton.setSelected(hard);
		savedExercisesWindow.setVisible(false);
	}
}
